Generally, hardware equipment (for example, a liquid crystal display screen, a camera, and a charger) of a same type may be produced by different manufacturers, or may further have different feature parameters; hardware equipment that is not completely same with each other differ in the use of an application program. Therefore, when an application program is set for each piece of hardware equipment, a corresponding application program needs to be set for the hardware equipment according to equipment identification information of the hardware equipment, for example, manufacturer information and feature parameter information.
In the prior art, a general purpose input output (General Purpose Input Output, GPIO for short) port may be used to identify an output level of hardware equipment. A GPIO port has only two states: a high level and a low level; therefore, one GPIO port may identify only two pieces of equipment identification information, that is, two GPIO ports may identify only four pieces of equipment identification information. By analogy, in the prior art, a fixed number of GPIO ports may identify only a limited number of pieces of equipment identification information, so as to limit the number of pieces of equipment identification information that a GPIO port may identify, thereby reducing identification efficiency of the GPIO port.